package com.wzz.seckillone.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzz.seckillone.pojo.SeckillOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-11-08
 */
@Mapper
public interface SeckillOrderMapper extends BaseMapper<SeckillOrder> {

    SeckillOrder getSeckillOrderByGoodsIdAndUserId(@Param("goodsId") String goodsId, @Param("userId") String userId);

    void saveOrder(SeckillOrder order);


    SeckillOrder getOrderByOrderId(String orderId);

    SeckillOrder isSuccessOrder(@Param("userId") String userId, @Param("goodsId") String goodsId);
}
